<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>硬币旋转</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        .rotate-wrap {
            width: 100px;
            height: 100px;
            margin: 100px;
            transform-style: preserve-3d;
            animation: rotate 5s linear infinite;
            position: relative;
        }

        .rotate-wrap:hover {
            animation-play-state: paused;
        }

        .rotate-wrap .front, .rotate-wrap .reverse {
            width: 100px;
            height: 100px;
            background-size: cover;
        }

        .rotate-wrap .front {
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            background-image: url('https://picsum.photos/id/935/100/100');
        }

        .rotate-wrap .reverse {
            background-image: url('https://picsum.photos/id/835/100/100');
        }

        .circle {
            border-radius: 50%;
        }

        .line {
            height: 200px;
            width: 1px;
            position: absolute;
            top: 0;
            left: 50%;
            background: red;
            transform: translateZ(0px);
        }

        @keyframes rotate {
            0% {
                transform: rotateY(0deg);
            }
            100% {
                transform: rotateY(360deg);
            }
        }
    </style>
</head>
<body>
<div class="rotate-wrap">
    <div class="front circle" style="transform: translateZ(1px);"></div>
    <div class="reverse circle"></div>
</div>

<div class="rotate-wrap">
    <div class="line"></div>
    <div class="front"></div>
    <div class="reverse" style="transform: translateZ(-5px);"></div>
</div>
</body>
</html>